<!--
 * @Author: hu_binbin
 * @Date: 2021-08-23 09:50:19
 * @LastEditTime: 2021-08-23 20:50:21
 * @Description: 新增操作票
-->
<template>
	<article class="bg_4dbfae">
		<Theader :title="title">
			<template slot="header_arrow">
				<van-icon size="25" name="arrow-left" @click="$pageBack"/>
			</template>
		</Theader>
        <div class="cell-list">
            <van-cell title="选择票面类型" required value="变电倒闸操作票" @click="showTicket=true" is-link></van-cell>
            <van-cell title="关联调度令" is-link @click="relatedBtn">
                <template slot="label">
                    <div>
                        <span>10kv中邦10号变电站：</span>
                        <label>将10kv分段I170开关</label>
                    </div>
                </template>
            </van-cell>
            <van-cell title="选择典型票模板" @click="gotoHistory" value="无" is-link></van-cell>
            <van-cell title="选择历史票模板" @click="gotoType" value="无" is-link></van-cell>
        </div>
        <!--底部按钮-->
        <div class="btn">
            <van-button color="#17B49B" @click="submitFile" style="width: 80%;" size="small" type="primary">填写操作票</van-button>
        </div>
        <!-- 反馈组件 巡视类型-->
        <van-action-sheet title="选择票面类型" 
			cancel-text="取消"
			@cancel="showTicket=false"
            v-model="showTicket"
            :actions="ticketList"
            @select="ticketListBtn"
		/>
	</article>
</template>
<script>
	import Theader from "../component/header"
	export default {
		name: "addTicket",
		components:{
			Theader
		},
		data() {
			return {
                title: "编制操作票",
                showTicket:false,
                ticketList:[
                    {
                        name:'变电倒闸操作票',
                    },
                    {
                        name:'变电安全措施操作票'
                    }
                ]
			}
		},
		computed: {

		},
		methods: {
            back(){
                this.$router.go(-1)
            },
            //rifid 
            rfidBtn() {

            },
            //扫描二维码
            scanBtn() {

            },
            submitFile() {
                this.$router.push({
					name: "editTicket",
				})
            },
            gotoHistory() {
                this.$router.push({
					name: "hositroyTicketList",
				})
            },
            gotoType() {
                this.$router.push({
					name: "typicalTicketList",
				})
            },
            ticketListBtn() {
                
            },
            relatedBtn() {
                this.$router.push({
					name: "commandList",
				})
            }
		},
		watch: {
			
		},
		mounted() {

		}
	}
</script>
<style scoped>
	article {
		display: flex;
		flex-direction: column;
		height: 100vh;
	}
    
    .btn{
        width: 100%;
        background: rgb(255, 255, 255);
        padding: 0.5rem 0px;
        position: fixed;
        bottom: 0;
        display: flex;
        justify-content: center;
    }
    .cell-list{
        margin-top: 3.5rem;
        margin: 3.5rem 0.7rem 2rem 0.7rem;
        border-radius: 0.7rem;
    }
    /deep/ .van-cell__label{
        font-size: 0.9rem;
        color: #666;
    }
</style>

